* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    background-color: #121212;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.left-panel, .right-panel {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.left-panel {
    border-right: 1px solid #333;
    align-items: center;
}

.speed-info {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.speed-info h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.speed-value {
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: baseline;
}

#speed {
    font-size: 40px;
    font-weight: bold;
    margin-right: 5px;
}

.unit {
    color: #aaa;
}

#canvas-container {
    width: 380px;
    height: 380px;
    position: relative;
    margin-top: 40px;
}

#radarCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#car-img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: auto;
    pointer-events: none;
}

.camera-view {
    flex: 2;
    background-color: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.camera-placeholder {
    color: #555;
    font-size: 18px;
    text-align: center;
}

#camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.control-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-btn {
    width: 80%;
    padding: 15px;
    font-size: 18px;
    background-color: #0078d7;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.main-btn:hover {
    background-color: #0063b1;
}

.main-btn.searching {
    background-color: #d32f2f;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.parking-spots {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 10px;
}

.spot-btn {
    flex: 1;
    margin: 0 10px;
    padding: 12px;
    font-size: 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spot-btn:hover:not(.disabled) {
    background-color: #444;
}

.spot-btn.active {
    background-color: #4caf50;
}

.spot-btn.disabled {
    background-color: #333;
    opacity: 0.5;
    cursor: not-allowed;
}

#secret-code-display {
    position: fixed;
    left: 10px;
    bottom: 10px;
    font-family: monospace;
    font-size: 10px;
    color: rgba(255, 253, 253, 0.134);
    pointer-events: none;
    user-select: none;
}